Skip to content

6. Add pytest test suite and GitHub Actions CI (Linux, macOS, Windows)#11

Open
musicalplatypus wants to merge 6 commits into
TexasInstruments:mainfrom
musicalplatypus:pr/testing-ci
Open

6. Add pytest test suite and GitHub Actions CI (Linux, macOS, Windows)#11
musicalplatypus wants to merge 6 commits into
TexasInstruments:mainfrom
musicalplatypus:pr/testing-ci

Conversation

@musicalplatypus

Copy link
Copy Markdown

Summary

Adds a comprehensive pytest test suite for tinyml-modelmaker and a GitHub Actions CI workflow to run tests automatically on every push and PR.

Test Suite (Tier 1-3)

Tier 1 — Component Tests (fast, no GPU required)

  • test_config_dict.py — ConfigDict serialization, merging, nested access
  • test_constants.py — Constants integrity, device/task type enums
  • test_dataset_utils.py — Dataset splitting, validation, edge cases
  • test_misc_utils.py — Utility function coverage
  • test_protocols.py — Protocol interface compliance

Tier 2 — Smoke Tests (medium, imports full packages)

  • test_config_validation.py — YAML config parsing and validation
  • test_model_registry.py — Model discovery, descriptions, filtering
  • test_pipeline_smoke.py — Pipeline instantiation without training

Tier 3 — Cross-Device Tests

  • test_cross_device.py — Device detection, model placement, dtype handling

GitHub Actions CI

  • Matrix: Linux (ubuntu-latest), macOS (macos-latest), Windows (windows-latest)
  • Python: 3.10
  • Tiers: Runs Tier 1 (component) and Tier 2 (smoke) on all platforms
  • Windows: Marked as experimental (continue-on-error: true) due to path handling differences

Files Changed (13 files)

  • 10 new test files in tinyml-modelmaker/tests/
  • 1 new CI workflow in .github/workflows/
  • Updated pyproject.toml with pytest configuration

Testing

  • All tests pass on macOS and Linux
  • Windows tests pass with python -m pytest invocation

t5fkg8d44d-beep and others added 6 commits April 7, 2026 07:21
Tests cover ConfigDict, constants (timeseries + vision), dataset_utils,
misc_utils (resolve_paths, resolve_run_name, simplify_dict). Adds
importorskip for test_protocols.py so it gracefully skips without TVM.

47 tests pass, 1 skipped on macOS (no TVM).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tier 1 — Component Tests (323 tests, 2.3s):
- test_model_registry.py: model descriptions, filtering, device constants
- test_config_validation.py: 303 parametrized YAML config validations

Tier 2 — Pipeline Smoke Tests (4 tests, 116s):
- Classification, regression, forecasting via two-phase approach
- Anomaly detection xfail (no device preset)

Tier 3 — Cross-Device Validation (195 tests, 1.8s):
- NPU hard/soft flag validation for all 22 devices
- MSPM0 classification-only task constraints
- Compilation profile correctness and quantization flags

Also: registered pytest markers (component, smoke, device) in pyproject.toml
Runs test_model_registry, test_config_validation, test_cross_device,
and test_pipeline_smoke on ubuntu-latest and windows-latest.
Installs ti_mcu_nnc platform-specific wheels.
@musicalplatypus musicalplatypus changed the title Add pytest test suite and GitHub Actions CI (Linux, macOS, Windows) 6. Add pytest test suite and GitHub Actions CI (Linux, macOS, Windows) Apr 7, 2026
Adithya-Thonse pushed a commit that referenced this pull request Jun 12, 2026
Merge in TINYML-ALGO/tinyml-agent-skills from 2026/pranav_a to main

* commit '640ffd38d857e9fbe9df08836cd20e04ff0f27f2':
  fixing tiny ml name
Adithya-Thonse added a commit that referenced this pull request Jun 12, 2026
de8af16d Pull request #45: https://jira.itg.ti.com/browse/TINYML_ALGO-698
REVERT: e48ef1a Pull request #14: TINYML_ALGO-711: fixing readme
REVERT: 16fc6a6 TINYML_ALGO-711: fixing readme
REVERT: e3639d2 Pull request #13: removing pycache
REVERT: f8bb3b7 removing pycache
REVERT: dd38428 Pull request #12: restructuring agent skill
REVERT: ff02a0e restructuring agent skill
REVERT: d26c6a5 Pull request #11: fixing tiny ml name
REVERT: 640ffd3 fixing tiny ml name
REVERT: 4ee3a19 Pull request #10: 2026/pranav a
REVERT: be83fc6 minor fixes
REVERT: e3a5700 removed assets, included autoMP quant
REVERT: 1af575a Pull request #9: correcting npu devices list
REVERT: 31e9eb1 correcting npu devices list
REVERT: 59b209b Pull request #8: improving readme
REVERT: 8c3260b improving readme
REVERT: 668916f Pull request #7: improving readme
REVERT: 68686b3 improving readme
REVERT: 814316e Pull request #6: fixes to readme and marketplace json
REVERT: e4bc0b4 fixes to readme and marketplace json
REVERT: 6a64208 Pull request #5: fixes to readme
REVERT: 0f9c868 fixes to readme
REVERT: 52f95ff Pull request #4: 2026/pranav a
REVERT: 443295d fixes to readme
REVERT: 1881112 fixes to readme and marketplace json
REVERT: 229ab57 Pull request #3: 2026/pranav a
REVERT: 6519104 minor readme fix
REVERT: 38e9f9f minor readme fix
REVERT: db81f81 Pull request #2: minor readme fix
REVERT: 1c0737a minor readme fix
REVERT: 0a0c02d Pull request #1: minor readme fix
REVERT: b682335 minor readme fix
REVERT: 062eb39 Initial Commit

git-subtree-dir: tinyml-agent-skills
git-subtree-split: de8af16d9e23de3e9bda3d811a0ebdece1178260
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants